<?php include $this->tpl('public:common.php') ?>
    
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">请填写接口资料</a></li>
    </ul>	
	<div id="myTabContent" class="tab-content">
		  <div class="tab-pane active in" id="home">
           <form id="tab" method="post" action="" autocomplete="off">
           		<?php foreach($config_field as $key=>$field):?>
					<?php if($field['type']=='text'):?>
						<label><?=$field['text']?></label>
						<input type="text" name="config[<?=$key?>]" value="<?=post('config.'.$key)?>" class="input-xlarge" required="true">
					<?php elseif($field['type']=='select'):?>
						<label><?=$field['text']?></label>
						<select name="config[<?=$key?>]" id="<?=$key?>" class="input-xlarge">
						<?php foreach($field['items'] as $_val=>$_name):?>
							<option value="<?=$_val?>"<?=post('config')[$key]==$_val ? ' selected' : ''?>><?=$_name?></option>
						<?php endforeach?>
					</select>
					<?php endif?>
           		<?php endforeach?>
           		<label>排序</label>
           		<input type="text" name="sort_order" value="<?=post('sort_order',255,'absint')?>" class="input-mini">
			<div class="btn-toolbar">
				<button type="submit" class="btn btn-primary"><strong>提交</strong></button>
				<div class="btn-group"></div>
			</div>
			</form>
        </div>
    </div>
</div>
<?php include $this->tpl('public:footer.php')?>